<html>
<head><meta charset="utf-8"><title>Enabling `-Z incremental-verify-ich` · t-compiler/wg-incr-comp · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/index.html">t-compiler/wg-incr-comp</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html">Enabling `-Z incremental-verify-ich`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="230129497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230129497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230129497">(Mar 13 2021 at 02:54)</a>:</h4>
<p>As a result of the miscompilation induced by incremental compilation in <a href="https://github.com/rust-lang/rust/issues/82920">https://github.com/rust-lang/rust/issues/82920</a>, I opened PR <a href="https://github.com/rust-lang/rust/pull/83007">https://github.com/rust-lang/rust/pull/83007</a> to turn on <code>-Z incremental-verify-ch</code>. Having this option on by default would have turned the miscompilation into an ICE.</p>
<p>Unfortunately, the performance impact is awful (<a href="https://perf.rust-lang.org/compare.html?start=61365c06250e2ba6e0a578ae990f055ac5339107&amp;end=213521923e2df5e849eee21b917477d429078204">https://perf.rust-lang.org/compare.html?start=61365c06250e2ba6e0a578ae990f055ac5339107&amp;end=213521923e2df5e849eee21b917477d429078204</a>) - regressions were anywhere from 1% to 320% (though the 320% was for a stress test benchmark).</p>



<a name="230129633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230129633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230129633">(Mar 13 2021 at 02:57)</a>:</h4>
<p>it looks like <code>incremental_verify_ich</code> gets called for both re-computed results and re-computed results. I think we could safely skip recomputing the hashes for results loaded from disk - if the hash were to change, it would be caused by a completely different kind of issue (the <code>HashStable</code> implementation would have to be non-deterministic, I think)</p>



<a name="230129642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230129642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230129642">(Mar 13 2021 at 02:57)</a>:</h4>
<p>I'll see if that makes the performance any better.</p>



<a name="230129901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230129901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230129901">(Mar 13 2021 at 03:01)</a>:</h4>
<p>I'm not 100% certain, but I think a non-deterministic <code>HashStable</code> impl would only lead to spuriouly marking a query as red (assuming that it didn't produce hash collisions), and could not lead to the unsoundness that results from the query result actually changing</p>



<a name="230130066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230130066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230130066">(Mar 13 2021 at 03:04)</a>:</h4>
<p>Commented on the PR but I'll say it here too -- I think performance hit is acceptable for mitigating this soundness hole.</p>



<a name="230130249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230130249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230130249">(Mar 13 2021 at 03:07)</a>:</h4>
<p>Looking at <a href="https://perf.rust-lang.org/compare.html?start=61365c06250e2ba6e0a578ae990f055ac5339107&amp;end=213521923e2df5e849eee21b917477d429078204&amp;stat=wall-time">wall-times</a> and disabling full and incr-full (both of which are not reusing results so don't really see impacts) you get at most a 50% hit on the stress test and only 5-15% wall time hits on most benchmarks. That's bad, but it's not horrible. IMO, it makes sense to land it on nightly at least - I'd rather ship a slower but correct compiler. Ultimately the 15% hits are also in the faster benchmarks; unsurprisingly opt and other builds which end up rerunning e.g. LLVM this is not as visible.</p>



<a name="230160995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230160995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230160995">(Mar 13 2021 at 12:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60/near/230129633">said</a>:</p>
<blockquote>
<p>it looks like <code>incremental_verify_ich</code> gets called for both re-computed results and re-computed results. I think we could safely skip recomputing the hashes for results loaded from disk - if the hash were to change, it would be caused by a completely different kind of issue (the <code>HashStable</code> implementation would have to be non-deterministic, I think)</p>
</blockquote>
<p>I would have said exactly the opposite. The re-computed queries are already hashed to determine the red/green color of the dep-node. Only the results loaded from disk are implicitly assumed to be green.</p>



<a name="230174431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230174431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230174431">(Mar 13 2021 at 16:44)</a>:</h4>
<blockquote>
<p>The re-computed queries are already hashed to determine the red/green color of the dep-node.</p>
</blockquote>
<p>That's only the case when at least one of the dependencies could not be marked green. In that case, <a href="https://github.com/rust-lang/rust/blob/301ad8a4fa3ea56fb980443b7997c8f9d72dd717/compiler/rustc_query_system/src/dep_graph/graph.rs#L678"><code>try_mark_previous_green</code> returns <code>None</code></a>, so we <a href="https://github.com/rust-lang/rust/blob/32dce353dec5f9069c941d4cd0c059ecc67b7c2b/compiler/rustc_query_system/src/query/plumbing.rs#L476-L489">will never call <code>load_from_disk_and_cache_in_memory</code></a></p>
<p>Instead, we will end up <a href="https://github.com/rust-lang/rust/blob/32dce353dec5f9069c941d4cd0c059ecc67b7c2b/compiler/rustc_query_system/src/query/plumbing.rs#L496">calling <code>force_query_with_job</code></a>, which <em>does</em> hash the result to determine the red/green color</p>



<a name="230174465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230174465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230174465">(Mar 13 2021 at 16:45)</a>:</h4>
<p>My change only affects the case where all the inputs are green - the query system currentl assumes that the query output will be unchanged, without actually checking it</p>



<a name="230174831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230174831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230174831">(Mar 13 2021 at 16:51)</a>:</h4>
<p>More generally, we can end up with miscompilations if the query system assumes that a query result hasn't changed when it actually has. I think this is the only case where that can happen - all other cases are either:</p>
<ol>
<li>Running a query for the first time, so nothing could already be expecting a different result</li>
<li>We're loading something from disk - unless the incremental cache got corrupted, then we're getting back whatever we serialized (assuming no bugs in the serialization/deserialization impl)</li>
<li>We're re-running a query because some of its inputs are not green. We already re-hash the result as part of the red/green algorithm, so the worst that can happen is that we spuriously throw mark a query as red, leading to unencessary work</li>
</ol>



<a name="230175455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175455">(Mar 13 2021 at 17:02)</a>:</h4>
<blockquote>
<p>We're loading something from disk - unless the incremental cache got corrupted, then we're getting back whatever we serialized (assuming no bugs in the serialization/deserialization impl)</p>
</blockquote>
<p>shouldn't the compiler handle these sorts of errors, though? having unsoundness because of bugs in deserialize seems not great</p>



<a name="230175489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175489">(Mar 13 2021 at 17:03)</a>:</h4>
<p>and theoretically someone could mess with with the incremental cache; the threat model is probably not super realistic, but it seems better to ICE than to generate broken code</p>



<a name="230175655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175655">(Mar 13 2021 at 17:05)</a>:</h4>
<p>Actually, incremental-verify-ich is already restricted to loading from the on-disk cache.</p>



<a name="230175810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175810">(Mar 13 2021 at 17:07)</a>:</h4>
<p>The incremental serialization and deserialization are not straightforward at all. For instance, the path for a DefId is <code>DefId -&gt; DefPathHash -&gt; DefId</code>, so the input and output <code>DefId</code>s are not guaranteed to be the same. This is the source of the issues with sorting by DefId.</p>



<a name="230175936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cjgillot <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175936">(Mar 13 2021 at 17:09)</a>:</h4>
<p>Computing a query always computes its hash, inside <code>DepGraph::with_task_impl</code> (except for no-hash queries).</p>



<a name="230175949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175949">(Mar 13 2021 at 17:09)</a>:</h4>
<blockquote>
<p>and theoretically someone could mess with with the incremental cache; the threat model is probably not super realistic, but it seems better to ICE than to generate broken code</p>
</blockquote>
<p>I think a better way of detecting that kind of issue would be to store hash the entire incremental file, store that somewhere, and verify it when we load it</p>



<a name="230175952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175952">(Mar 13 2021 at 17:09)</a>:</h4>
<p>(not sure if we already do something like that)</p>



<a name="230175959"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230175959" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230175959">(Mar 13 2021 at 17:09)</a>:</h4>
<p>someone could mess with that hash too though</p>



<a name="230176003"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176003" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176003">(Mar 13 2021 at 17:10)</a>:</h4>
<p>if you don't trust part of the file system, you can't trust any of it</p>



<a name="230176112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176112">(Mar 13 2021 at 17:12)</a>:</h4>
<p>I was thinking of guarding against corruption</p>



<a name="230176121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176121">(Mar 13 2021 at 17:12)</a>:</h4>
<p>not deliberate modification</p>



<a name="230176159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176159">(Mar 13 2021 at 17:13)</a>:</h4>
<p>hmm, maybe a better example is that bootstrap reuses the same cache between different nightly compilers</p>



<a name="230176169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176169">(Mar 13 2021 at 17:13)</a>:</h4>
<p>it would be cool if the compiler could catch that somehow - I don't know if that's what verify-ich is actually for though</p>



<a name="230176227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176227">(Mar 13 2021 at 17:14)</a>:</h4>
<blockquote>
<p>Computing a query always computes its hash, inside DepGraph::with_task_impl (except for no-hash queries).</p>
</blockquote>
<p>Maybe you mean something specific by 'compute', but the underlying query provider can get run without hashing the result. The query provider <a href="https://github.com/rust-lang/rust/blob/32dce353dec5f9069c941d4cd0c059ecc67b7c2b/compiler/rustc_query_system/src/query/plumbing.rs#L544">gets directly invoked via <code>compute</code></a> inside <code>load_from_disk_and_cache_in_memory</code>, which is the case my PR addresses</p>



<a name="230176235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176235">(Mar 13 2021 at 17:14)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/32dce353dec5f9069c941d4cd0c059ecc67b7c2b/compiler/rustc_query_impl/src/plumbing.rs#L391-L401">https://github.com/rust-lang/rust/blob/32dce353dec5f9069c941d4cd0c059ecc67b7c2b/compiler/rustc_query_impl/src/plumbing.rs#L391-L401</a></p>



<a name="230176334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176334">(Mar 13 2021 at 17:16)</a>:</h4>
<blockquote>
<p>hmm, maybe a better example is that bootstrap reuses the same cache between different nightly compilers</p>
</blockquote>
<p>Do you mean between different beta compilers, or re-using the stage0 incr cache with the stage1 compiler?</p>



<a name="230176349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176349">(Mar 13 2021 at 17:17)</a>:</h4>
<blockquote>
<p>re-using the stage0 incr cache with the stage1 compiler?</p>
</blockquote>
<p>^ this one</p>



<a name="230176350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176350">(Mar 13 2021 at 17:17)</a>:</h4>
<p>also, I'm pretty sure cargo throws away everything when the compiler version changes (which includes switching nightly versions) - the only time that doesn't work is when using a stage1 compiler, which just has <code>-dev</code> in the name</p>



<a name="230176361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176361">(Mar 13 2021 at 17:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60/near/230176350">said</a>:</p>
<blockquote>
<p>also, I'm pretty sure cargo throws away everything when the compiler version changes (which includes switching nightly versions) - the only time that doesn't work is when using a stage1 compiler, which just has <code>-dev</code> in the name</p>
</blockquote>
<p>yup that's exactly what I mean</p>



<a name="230176367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176367">(Mar 13 2021 at 17:17)</a>:</h4>
<p>I think any issue with the stage0/stage1 cache should be done in bootstrap</p>



<a name="230176376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176376">(Mar 13 2021 at 17:17)</a>:</h4>
<p>bootstrap can't do anything other than completely throw away the cache though :/</p>



<a name="230176378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176378">(Mar 13 2021 at 17:17)</a>:</h4>
<p>since that's a really weird use-case that's only relevant for the compiler</p>



<a name="230176381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176381">(Mar 13 2021 at 17:18)</a>:</h4>
<p>there's an option today to do that but no one uses it</p>



<a name="230176382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176382">(Mar 13 2021 at 17:18)</a>:</h4>
<p>what would you want it to do?</p>



<a name="230176425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230176425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230176425">(Mar 13 2021 at 17:18)</a>:</h4>
<p><span class="user-mention silent" data-user-id="125294">Aaron Hill</span> <a href="#narrow/stream/241847-t-compiler.2Fwg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60/near/230176378">said</a>:</p>
<blockquote>
<p>since that's a really weird use-case that's only relevant for the compiler</p>
</blockquote>
<p>yeah that's fair, it's probably off topic for this thread</p>



<a name="230269344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230269344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230269344">(Mar 14 2021 at 21:28)</a>:</h4>
<p>This change has already found another query implementation bug: <a href="https://github.com/rust-lang/rust/issues/83126">https://github.com/rust-lang/rust/issues/83126</a></p>



<a name="230269364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241847-t-compiler/wg-incr-comp/topic/Enabling%20%60-Z%20incremental-verify-ich%60/near/230269364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Hill <a href="https://rust-lang.github.io/zulip_archive/stream/241847-t-compiler/wg-incr-comp/topic/Enabling.20.60-Z.20incremental-verify-ich.60.html#230269364">(Mar 14 2021 at 21:28)</a>:</h4>
<p><code>extern_mod_stmt_cnum</code> uses global untracked state, but wasn't marked <code>eval_always</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>